# Cookies.py # # Description: Draws a chocolate chip cookie with our turtle. # # Anne Lavergne # Date: Feb. 16 2024 # Import the turtle library import turtle # Function to draw a chocolate chip cookie def drawCookie(aX,aY): """Draw a chocolate chip cookie.""" # Draw the contour of the cookie tt.penup() tt.goto(aX,aY) tt.pendown() radius = 30 tt.circle(radius) tt.penup() return # ***Main part of the program # Creates a graphics window - canvas canvas = turtle.Screen() # Create a turtle named tt tt = turtle.Turtle() # Draw cookies #for location in [(-140,-120), (100,75), (0,0)]: for location in ((-140,-120), (100,75), (0,0), (-68,100)): drawCookie(location[0], location[1]) # Click on the canvas to exit canvas.exitonclick()